package com.bangbang.blog.service.impl;

import com.bangbang.blog.pojo.TbDiscounts;
import com.bangbang.blog.mapper.TbDiscountsMapper;
import com.bangbang.blog.service.ITbDiscountsService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 优惠券表 服务实现类
 * </p>
 *
 * @author ${author}
 * @since 2021-08-12
 */
@Service
public class TbDiscountsServiceImpl extends ServiceImpl<TbDiscountsMapper, TbDiscounts> implements ITbDiscountsService {

    @Autowired
    private TbDiscountsMapper tbDiscountsMapper;

    @Override
    public void insert(TbDiscounts tbDiscounts) {
        tbDiscountsMapper.insert(tbDiscounts);
    }

    @Override
    public void delete(Long disId) {
        tbDiscountsMapper.deleteById(disId);
    }

    @Override
    public void select(Long disId) {
        tbDiscountsMapper.selectById(disId);
    }
}
